package com.hui.stock.mapper;

import com.hui.stock.pojo.entity.SysUserRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author ymh
* @description 针对表【sys_user_role(用户角色表)】的数据库操作Mapper
* @createDate 2024-11-11 16:04:25
* @Entity com.hui.stock.pojo.entity.SysUserRole
*/
public interface SysUserRoleMapper {

    int deleteByPrimaryKey(Long id);

    int insert(SysUserRole record);

    int insertSelective(SysUserRole record);

    SysUserRole selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(SysUserRole record);

    int updateByPrimaryKey(SysUserRole record);

    /**
     * 根据用户id删除用户角色表
     * @param userId
     */
    void deleteByUserId(@Param("userId") Long userId);

    /**
     * 批量增加用户角色记录
     * @param sysUserRoles 用户角色对象
     */
    void batchInsert(@Param("sysUserRoles") List<SysUserRole> sysUserRoles);
}
